/*
 * @Author: sunkai@xinxinapp.cn
 * @Date: 2021-03-09 15:27:08
 * @LastEditTime: 2021-03-10 14:42:24
 * @LastEditors: sunkai@xinxinapp.cn
 * @Description:
 * @FilePath: /edu/src/services/user.ts
 */
import qs from 'qs'
import request from '@/utils/request'

interface User {
  phone: string
  password: string
}

export const login = (data: User) => {
  return request({
    method: 'POST',
    url: '/front/user/login',
    data: qs.stringify(data)
  })
}

export const getUserInfo = () => {
  return request({
    method: 'GET',
    url: '/front/user/getInfo'
  })
}

export const getUserPages = (data: any) => {
  return request({
    method: 'POST',
    url: '/boss/user/getUserPages',
    data
  })
}

export const forbidUser = (userId: string | number) => {
  return request({
    method: 'POST',
    url: '/boss/user/forbidUser',
    params: {
      userId
    }
  })
}
